package com.example.springbootdemo.service;

import com.example.springbootdemo.Mapper.UserMapper;
import com.example.springbootdemo.entity.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService{

    @Resource
    private UserMapper userMapper;

    @Override
    public List<User> getUser() {
        List<User> allUser = userMapper.getAllUser();
        return allUser;
    }

    @Override
    public Boolean addOneUSer(User user) {
        String name = user.getName();
        String password = user.getPassword();
        Boolean aa =userMapper.addUser(name,password);
        return aa;
    }
}
